package com.tencent.stat;

import android.content.Context;
import com.tencent.stat.common.StatLogger;
import java.util.Map;

final class w
  implements Runnable
{
  public final void run()
  {
    try
    {
      synchronized (StatServiceImpl.h())
      {
        if (StatServiceImpl.h().size() >= StatConfig.getMaxParallelTimmingEvents())
        {
          StatServiceImpl.f().error("The number of page events exceeds the maximum value " + Integer.toString(StatConfig.getMaxParallelTimmingEvents()));
          return;
        }
        StatServiceImpl.b(this.a);
        if (!(StatServiceImpl.h().containsKey(StatServiceImpl.i())))
          break label126;
        StatServiceImpl.f().e("Duplicate PageID : " + StatServiceImpl.i() + ", onResume() repeated?");
        return;
      }
    }
    catch (Throwable localThrowable)
    {
      StatServiceImpl.f().e(localThrowable);
      StatServiceImpl.a(this.b, localThrowable);
      return;
    }
    label126: StatServiceImpl.h().put(StatServiceImpl.i(), Long.valueOf(System.currentTimeMillis()));
    monitorexit;
    StatServiceImpl.a(this.b, true, this.c);
  }
}